home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / overview / dave falkenburg's sprocket / experimental stuff / mailabledocwindow.cp next >
Encoding:
Text File  |  2000-09-28  |  1.7 KB  |  65 lines

  1. /*
  2.     File:        MailableDocWindow.cp
  3.  
  4.     Contains:    A wacky experiment with AOCE
  5.  
  6.     Written by: Steve & Dave Falkenburg
  7.  
  8.     Copyright:    Copyright © 1993-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 8/19/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 9/27/94        DRF                Changes for Dave Mark: AppLib.h is now Sprocket.h.
  21.                 9/9/94        DRF                Conditionalized AOCE support.
  22.                 8/26/94        DRF                Added GetPerfectWindowSize, with call to
  23.                                             AdjustPerfectWindowSizeForMailer.
  24.  
  25. */
  26.  
  27. #include "Sprocket.h"
  28. #include "MailableDocWindow.h"
  29.  
  30.  
  31. #if    qAOCEAware
  32.  
  33.  
  34.  
  35. TMailableDocWindow::TMailableDocWindow()
  36.     {
  37.     this->CreateWindow();        //    must be a normal window
  38.     }
  39.  
  40.  
  41. WindowPtr
  42. TMailableDocWindow::MakeNewWindow(WindowPtr behindWindow)
  43.     {
  44.     WindowPtr    aWindow = GetNewColorOrBlackAndWhiteWindow(1027,nil,behindWindow);
  45.  
  46.     return aWindow;
  47.     }
  48.  
  49.  
  50. void
  51. TMailableDocWindow::GetPerfectWindowSize(Rect * perfectSize)
  52.     {
  53.     TWindow::GetPerfectWindowSize(perfectSize);
  54.     AdjustPerfectWindowSizeForMailer(perfectSize);
  55.     }
  56.  
  57.  
  58. void
  59. TMailableDocWindow::DrawContents(void)
  60.     {
  61.     //    drawing will be clipped to the content so we can go ahead and use the portRect
  62.     FillRect(&fWindow->portRect,&qd.ltGray);
  63.     }
  64.  
  65. #endif